@import '../../../themes/basic/base-all.less';
/* ---------------table树表特性（tree）----START----------------------------------------------*/
.ti3-table > table > tbody,
.ti3-table > .ti3-resize-wrapper > table > tbody,
.ti3-table > .ti3-table-container > table > tbody {
  & > tr > td .ti3-table-tree {
    cursor: pointer;
    .ti3-icon-minus-square,
    .ti3-icon-plus-square {
      font-size: var(--ti-table-tree-square-icon-font-size);
      margin-right: var(--ti-common-space-2x);
      line-height: 18px;
      vertical-align: bottom;
    }
    .ti3-icon-minus-square {
      color: var(--ti-common-color-icon-active);
    }
    .ti3-icon-plus-square {
      color: var(--ti-common-color-icon-normal);
    }
    .ti3-icon-minus-square:hover,
    .ti3-icon-plus-square:hover {
      color: var(--ti-common-color-icon-hover);
    }
    .ti3-icon-minus-square:active,
    .ti3-icon-plus-square:active {
      color: var(--ti-common-color-icon-active);
      background: var(--ti-common-color-bg-white-normal);
    }
  }
  // 各层级内容对齐
  & > tr > td .ti3-table-tree-no-leaf {
    margin-left: calc(var(--ti-table-tree-square-icon-font-size) + var(--ti-common-space-2x));
  }
}

/* ---------------table树表特性（tree）----END----------------------------------------------*/

/* ---------------table设置tip时克隆DOM的样式----START----------------------------------------------*/
.ti3-table-cell-clone {
  overflow: visible !important;
  position: absolute !important;
  visibility: hidden !important;
  .box-sizing(var(--ti-table-box-model));
  width: auto !important;
}
/* ---------------table设置tip时克隆DOM的样式----END----------------------------------------------*/

/* ---------------table表头锁定（双表）----START----------------------------------------------*/
.ti3-table {
  & > .ti3-table-fixed-head {
    overflow: hidden;
    position: relative;
    & > table {
      margin-left: 0;
    }
    & > .ti3-table-fixed-head-filler {
      position: absolute;
      height: 100%;
      right: 0;
      background-color: var(--ti-common-color-bg-white-emphasize);
      top: 0;
      bottom: 0;
    }
    & + .ti3-table-container {
      // 表头锁定时，表格容器底部有边框
      border-bottom: var(--ti-common-border-weight-normal) var(--ti-common-border-style-solid) var(--ti-common-color-line-dividing);
      & > table > thead > tr > th {
        height: 0;
        border-bottom: none;
      }
      & > table > tbody > tr {
        &:last-child > td {
          border-bottom: none !important;
        }
      }
    }
  }
  & > .ti3-table-container {
    overflow: auto;
  }
}
/* ---------------table表头锁定（双表头）----END----------------------------------------------*/

/* ---------------table列固定----START----------------------------------------------*/
.ti3-table-column-fixed-left {
  position: sticky !important;
  left: 0;
  z-index: 1;
  background-color: inherit;
  &.ti3-table-floating-fixed-column {
    box-shadow: 5px 0 5px 0 rgba(0, 0, 0, 0.1);
  }
}
.ti3-table-column-fixed-right {
  position: sticky !important;
  right: 0;
  z-index: 1;
  background-color: inherit;
  &.ti3-table-floating-fixed-column {
    box-shadow: -5px 0 5px 0 rgba(0, 0, 0, 0.1);
  }
}
/* ---------------table列固定----END----------------------------------------------*/
.ti3-table-row-disable {
  color: #999;
}

.ti3-table-soldout {
  &:extend(.ti3-icon all);
  &:extend(.ti3-icon-sold-out all);
  width: 16px;
  display: inline-block;
  height: 16px;
  background: #999;
  text-align: center;
  line-height: 16px;
  color: #fff;
  font-size: 12px;
}

.ti3-table-row-message {
  display: inline-block;
  padding: 0 4px;
  height: 16px;
  line-height: 16px;
  font-size: 12px;
  color: #fff;
  text-align: center;
  margin-left: 5px;
}
.ti3-table-row-message-soldout {
  &:extend(.ti3-table-row-message all);
  background: #999;
}

.ti3-table-row-message-new {
  &:extend(.ti3-table-row-message all);
  background: #e41f2b;
}

.ti3-table-row-message-recommended {
  &:extend(.ti3-table-row-message all);
  background: #f57f06;
}
